/**
 * 
 * 
 * 你可以打开F12控制台，使用window.connector进行测试
 * 
 * 
 * 官方API地址
 * https://api.onlyoffice.com/docs/office-api/usage-api/text-document-api/
 * 
 */

window.connector.callCommand(function () {
    var oDocument = Api.GetDocument();
    var oParagraph = oDocument.GetElement(0);
    var oRange = oParagraph.GetRange(2, 4);
    oRange.AddText("曹瑞的onlyoffice版本");
    oRange.SetHighlight("yellow");
}, function () {});